//
//  Test.cpp
//  博客代码
//
//  Created by 马鹏朔 on 2022/11/17.
//

#include "Stack.hpp"


    void TestStack()
    {
        ST st;
        StackInit(&st);
        StackPush(&st, 1);
        StackPush(&st, 2);
        StackPush(&st, 3);
        printf("%d ", StackTop(&st));
        StackPop(&st);
        printf("%d ", StackTop(&st));
        StackPop(&st);

        StackPush(&st, 4);
        StackPush(&st, 5);

        while (!StackEmpty(&st))
        {
            printf("%d ", StackTop(&st));
            StackPop(&st);
        }
        printf("\n");
    }
    
int main()
{
    TestStack();
    return 0;
}
